<?php namespace App\Lib\Params;
/**
 * Created by PhpStorm.
 * User: xiaosl
 * Date: 15/4/18
 * Time: 下午11:59
 */
class InfoSearchParams extends BaseSearchParams{
    public $firstColumnId = 0;
    public $secondColumnId = 0;
    public $title = '';

    public function __construct(array $infoSearch=array()){
        parent::__construct();
        if(!empty($infoSearch['firstColumnId']) && is_numeric($infoSearch['firstColumnId'])){
            $this->firstColumnId = $infoSearch['firstColumnId'];
        }
        if(!empty($infoSearch['secondColumnId']) && is_numeric($infoSearch['secondColumnId'])){
            $this->secondColumnId = $infoSearch['secondColumnId'];
        }elseif(!empty($infoSearch['firstColumnId']) && is_numeric($infoSearch['firstColumnId'])){
            $this->secondColumnId = $infoSearch['firstColumnId'];
        }
        if(!empty($infoSearch['title'])){
            $this->title = $infoSearch['title'];
        }
    }
}